import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router'


const routes: Array<RouteRecordRaw> = [
    {
        //  登录页面
        path: '/',
        name: "BackLogin",
        component: () => import('../views/BackLogin.vue')
    },
    {
        //   注册页面
        path: '/register',
        name: 'Register',
        component: () => import('../views/RegisterPage.vue')
    },
    {
        // 主页面
        path: '/linkhotai',
        name: "linkhotai",
        redirect: '/linkhotai/gzt',
        component: () => import('../views/LinkHoTaiShow.vue'),
        children: [
            {
                // 控制台
                path: 'gzt',
                name: "Gzt",
                component: () => import('../views/GzTView.vue')
            },
            {
                //   部门管理
                path: 'sectionmanage',
                name: "SectionManage",
                component: () => import('../views/SectionManage.vue')
            },
            {
                //     用户管理
                path: 'usermanage',
                name: "UsersManage",
                component: () => import('../views/UsersManage.vue')
            },
            {
                //     角色管理
                path: 'rolemanggement',
                name: "roleMangGement",
                component: () => import('../views/RoleManaGement.vue')
            },
            {
                //     个人中心
                path: 'personalCenter',
                name: "personalCenter",
                component: () => import('../views/PersonalCenter.vue')
            },
            {
                //     客户公海
                path: 'StatisticsSeas',
                name: "StatisticsSeas",
                component: () => import('../views/StatisticsSeas.vue')
            },
            {
                //     客户管理
                path: 'CustomerSeas',
                name: "CustomerSeas",
                component: () => import('../views/CustomerSeasView.vue')
            }

        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
